<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:p="http://primefaces.org/ui"
        xmlns:ui="http://java.sun.com/jsf/facelets">


<ui:composition template="/templates/fornecedor.xhtml">

        <ui:define name="menu">
                <ui:include src="/fornecedor/menu.xhtml" />
        </ui:define>

        <ui:define name="conteudo">
                <div id="texto">

                        <h2>Cadastro de Cliente</h2>
                </div>

                <h:form id="form">
                        <p:growl id="growl" showDetail="false" />

                        <h:inputHidden value="#{clienteBean.cliente.idCliente}" />

                        <p:accordionPanel>
                                <p:tab title="Dados do cliente">
                                        <p:fieldset>

                                                        <div style="padding-left: 30px; float: left; margin-top: 10px;">

                                                                <p:panel id="pnlCadastro">

		                                                                        <h:panelGrid columns="5">
                                                                                <h:outputLabel value="Nome : * " for="nome"  style="font-weight:bold" />
                                                                                <p:inputText id="nome" label="Nome"
                                                                                                value="#{clienteBean.cliente.nome}" required="true"
                                                                                                requiredMessage="Informe o seu nome" size="30"
                                                                                                style="heght:30px;" />
                                                                                        <span id="erro"> <h:message for="nome" /></span>                                                                        		
                                                                        		</h:panelGrid>
                                                                        		
		                                                                        <h:panelGrid columns="2">                                                                                        
                                                                                <h:outputLabel value="CNPJ : * " for="cpfCnpj"  style="font-weight:bold" />                                                                                        
                                                                                <p:inputText id="cpfCnpj" label="CNPJ"
                                                                                                value="#{clienteBean.cliente.cpfCnpj}" required="true"
                                                                                                requiredMessage="Informe o seu CNPJ" size="30"
                                                                                                style="heght:30px;" />                                                                                                
                                                                                        <span id="erro"> <h:message for="cpfCnpj" /></span>
																				</h:panelGrid>
																				
		                                                                        <h:panelGrid columns="3">                                                                                                                                                                                       
                                                                                <h:outputLabel value="Número da carteira de habilitacao : * " for="nroHab"  style="font-weight:bold" />                                                                                                                                                                                
                                                                                <p:inputText id="nroHab" label="Numero da habilitacao"
                                                                                                value="#{clienteBean.cliente.nroHab}" required="true"
                                                                                                requiredMessage="Informe o seu numero da habilitacao" size="30"
                                                                                                style="heght:30px;" />                                                                                                
                                                                                        <span id="erro"> <h:message for="nroHab" /></span>                                                                                                                                                                               
                                                                                 </h:panelGrid>       

		                                                                        <h:panelGrid columns="4">
                                                                                <h:outputLabel value="Endereco : * " for="endereco"  style="font-weight:bold" />
                                                                                <p:inputText id="endereco" label="endereco"
                                                                                                value="#{clienteBean.cliente.endereco}" required="true"
                                                                                                requiredMessage="Informe o seu endereco" size="30"
                                                                                                style="heght:30px;" />
                                                                                        <span id="erro"> <h:message for="endereco" /></span>
																				</h:panelGrid>
																				
																				<h:panelGrid columns="4">
                                                                                <h:outputLabel value="Email: * " for="email"  style="font-weight:bold" />
                                                                                <p:inputText id="email" label="email"
                                                                                                value="#{clienteBean.cliente.email}" required="true"
                                                                                                requiredMessage="Informe e-mail" size="30"
                                                                                                style="heght:30px;" />
                                                                                        <span id="erro"> <h:message for="email" /></span>
																				</h:panelGrid>
																																								
																				<h:panelGrid columns="4">
                                                                                <h:outputLabel value="Sexo : * " for="sexo"  style="font-weight:bold" />
                                                                                <p:inputText id="sexo" label="sexo"
                                                                                                value="#{clienteBean.cliente.sexo}" required="true"
                                                                                                requiredMessage="Informe sexo" size="30"
                                                                                                style="heght:30px;" />
                                                                                        <span id="erro"> <h:message for="sexo" /></span>
																				</h:panelGrid>
																				
																				<h:panelGrid columns="4">
                                                                                <h:outputLabel value="Carteira de habilitação: * " for="catHab"  style="font-weight:bold" />
                                                                                <p:inputText id="catHab" label="catHab"
                                                                                                value="#{clienteBean.cliente.catHab}" required="true"
                                                                                                requiredMessage="Informe carteira de hobilitação" size="30"
                                                                                                style="heght:30px;" />
                                                                                        <span id="erro"> <h:message for="endereco" /></span>
																				</h:panelGrid>
																				
																				<h:panelGrid columns="4">
                                                                                <h:outputLabel value="Estado Emissor : * " for="estadoEmissor"  style="font-weight:bold" />
                                                                                <p:inputText id="estadoEmissor" label="estadoEmissor"
                                                                                                value="#{clienteBean.cliente.estadoEmissor}" required="true"
                                                                                                requiredMessage="Informe o seu endereco" size="30"
                                                                                                style="heght:30px;" />
                                                                                        <span id="erro"> <h:message for="endereco" /></span>
																				</h:panelGrid>
																																							
																				
																				<h:panelGrid columns="4">
                                                                                <h:outputLabel value="Passaporte: * " for="passaporte"  style="font-weight:bold" />
                                                                                <p:inputText id="passaporte" label="passaporte"
                                                                                                value="#{clienteBean.cliente.passaporte}" required="true"
                                                                                                requiredMessage="Informe passaporte" size="30"
                                                                                                style="heght:30px;" />
                                                                                        <span id="erro"> <h:message for="email" /></span>
																				</h:panelGrid>
																				
																				<h:panelGrid columns="4">
                                                                                <h:outputLabel value="Tipo Pessoa: * " for="tipoPessoa"  style="font-weight:bold" />
                                                                                <p:inputText id="tipoPessoa" label="tipoPessoa"
                                                                                                value="#{clienteBean.cliente.tipoPessoa}" required="true"
                                                                                                requiredMessage="Informe tipo de pessoa" size="30"
                                                                                                style="heght:30px;" />
                                                                                        <span id="erro"> <h:message for="email" /></span>
																				</h:panelGrid>
																				
																				
																				<h:panelGrid columns="4">
                                                                                <h:outputLabel value="Telefone: * " for="telefone"  style="font-weight:bold" />
                                                                                <p:inputText id="telefone" label="telefone"
                                                                                                value="#{clienteBean.cliente.telefone}" required="true"
                                                                                                requiredMessage="Informe telefone" size="30"
                                                                                                style="heght:30px;" />
                                                                                        <span id="erro"> <h:message for="email" /></span>
																				</h:panelGrid>
                                                                                        
                                                                </p:panel>
                                                        </div>

                                        </p:fieldset>
                                </p:tab>

                        </p:accordionPanel>
                        <br></br>


                        <h:panelGroup>
                                <h:commandButton value="Salvar" action="#{clienteBean.salvar}"
                                        style="height: 30px;" />
                        </h:panelGroup>
                </h:form>

        </ui:define>
</ui:composition>
</html>